<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class raovat extends CI_Controller 
{

	function __construct()
	{
		parent::__construct();
		$this->load->model('raovat_model','raovat');
		$this->load->helper('date');
		$this->load->helper('app');
		$this->load->helper('str');
	}
	
	function index()
	{
		redirect('raovat/muaban') ;
	}
	
	/*function category()
	{
		$data['title'] = "" ;
		$class_id = (int)$this->uri->segment(3);
		//pagging
		$config['total_rows'] = $this->raovat->count_all_category($class_id) ;
		$config['per_page']  =   30;//5
		$config['num_links']  = 10;//5
		$config['next_link'] = 'next' ;
		$config['first_link'] = '' ;
		$config['prev_link'] = 'prev' ;
		$config['last_link'] = '' ;
		$config['uri_segment'] = 3; 
		$config['base_url'] = base_url().'index.php/raovat/index/';
		$this->pagination->initialize($config);
		$data['paging']    = $this->pagination->create_links();
		//get data
		$data['list'] = $this->raovat->get_all_category($class_id,$config['per_page'],$config['uri_segment']);
		$this->site->load('raovat',$data) ;
	}
	
	function chitiet()
	{
		$id = (int)$this->uri->segment(3);
		$data['rs'] = $this->raovat->get_id($id); //trit($data) ;
		$data['title'] = "" ;
		$data['list_cate'] = $this->raovat->get_all_category($data['rs']->class_id, 5, 0);
		$this->site->load('detail',$data) ;
	}*/
	
}

?>